<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script type="text/javascript">
        var a=1;
        var b=2;
        var c = "+";
        var d ="/";
        var e= "*";
        var f="-"
        switch (e) {
            case  "+":document.write(a+b);break;
            case  "-":document.write(a-b);break;
            case  "*":document.write(a*b);break;
            case  "/":document.write(a/b);break;
            default:document.write("输入有误");
        }
    </script>
</body>
</html>